package com.zhoukai.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhoukai.domain.Menu;
import org.apache.ibatis.annotations.Param;

import java.io.Serializable;
import java.util.List;

/**
 * @Description TODO
 * @Author Mr.ZHOU
 * @Date Created in 2021/12/15 11:13
 */

public interface MenuMapper extends BaseMapper<Menu> {

    /**
     * 根据菜单ID查询它的子节点个数
     *
     * @param menuId
     * @return
     */
    Long queryChildCountByMenuId(Long menuId);

    List<Long> queryMenuIdsByRoleId(@Param("roleId")Long roleId);

    List<Menu> selectListByUserId(@Param("userId")Serializable userId);
}